package com.cy.law.db.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "device_gps", schema = "zhifayi", catalog = "")
public class DeviceGps {
    private Integer id;
    private String deviceId;
    private String deviceName;
    private String deviceType;
    private String batteryRemaining;
    private String time;
    private String divisionEw;
    private Double longitude;
    private String divisionNs;
    private Double latitude;
    private Double direction;
    private Double speed;
    private Integer satellites;
    private Double precision;
    private Double height;
    private Integer retransFlag;
    private Integer neesResponse;
    private String remark;
    private String pitchAngle;
    private String relativeHeight;
    private String rollAngle;
    private String verticalSpeed;
    private String yawAngle;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "device_id")
    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    @Basic
    @Column(name = "device_name")
    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    @Basic
    @Column(name = "device_type")
    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    @Basic
    @Column(name = "battery_remaining")
    public String getBatteryRemaining() {
        return batteryRemaining;
    }

    public void setBatteryRemaining(String batteryRemaining) {
        this.batteryRemaining = batteryRemaining;
    }

    @Basic
    @Column(name = "f_time")
    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Basic
    @Column(name = "division_ew")
    public String getDivisionEw() {
        return divisionEw;
    }

    public void setDivisionEw(String divisionEw) {
        this.divisionEw = divisionEw;
    }

    @Basic
    @Column(name = "longitude")
    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    @Basic
    @Column(name = "division_ns")
    public String getDivisionNs() {
        return divisionNs;
    }

    public void setDivisionNs(String divisionNs) {
        this.divisionNs = divisionNs;
    }

    @Basic
    @Column(name = "latitude")
    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    @Basic
    @Column(name = "f_direction")
    public Double getDirection() {
        return direction;
    }

    public void setDirection(Double direction) {
        this.direction = direction;
    }

    @Basic
    @Column(name = "f_speed")
    public Double getSpeed() {
        return speed;
    }

    public void setSpeed(Double speed) {
        this.speed = speed;
    }

    @Basic
    @Column(name = "satellites")
    public Integer getSatellites() {
        return satellites;
    }

    public void setSatellites(Integer satellites) {
        this.satellites = satellites;
    }

    @Basic
    @Column(name = "f_precision")
    public Double getPrecision() {
        return precision;
    }

    public void setPrecision(Double precision) {
        this.precision = precision;
    }

    @Basic
    @Column(name = "f_height")
    public Double getHeight() {
        return height;
    }

    public void setHeight(Double height) {
        this.height = height;
    }

    @Basic
    @Column(name = "retrans_flag")
    public Integer getRetransFlag() {
        return retransFlag;
    }

    public void setRetransFlag(Integer retransFlag) {
        this.retransFlag = retransFlag;
    }

    @Basic
    @Column(name = "nees_response")
    public Integer getNeesResponse() {
        return neesResponse;
    }

    public void setNeesResponse(Integer neesResponse) {
        this.neesResponse = neesResponse;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "pitch_angle")
    public String getPitchAngle() {
        return pitchAngle;
    }

    public void setPitchAngle(String pitchAngle) {
        this.pitchAngle = pitchAngle;
    }

    @Basic
    @Column(name = "relative_height")
    public String getRelativeHeight() {
        return relativeHeight;
    }

    public void setRelativeHeight(String relativeHeight) {
        this.relativeHeight = relativeHeight;
    }

    @Basic
    @Column(name = "roll_angle")
    public String getRollAngle() {
        return rollAngle;
    }

    public void setRollAngle(String rollAngle) {
        this.rollAngle = rollAngle;
    }

    @Basic
    @Column(name = "vertical_speed")
    public String getVerticalSpeed() {
        return verticalSpeed;
    }

    public void setVerticalSpeed(String verticalSpeed) {
        this.verticalSpeed = verticalSpeed;
    }

    @Basic
    @Column(name = "yaw_angle")
    public String getYawAngle() {
        return yawAngle;
    }

    public void setYawAngle(String yawAngle) {
        this.yawAngle = yawAngle;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DeviceGps deviceGps = (DeviceGps) o;
        return id == deviceGps.id &&
                Objects.equals(deviceId, deviceGps.deviceId) &&
                Objects.equals(deviceName, deviceGps.deviceName) &&
                Objects.equals(deviceType, deviceGps.deviceType) &&
                Objects.equals(batteryRemaining, deviceGps.batteryRemaining) &&
                Objects.equals(time, deviceGps.time) &&
                Objects.equals(divisionEw, deviceGps.divisionEw) &&
                Objects.equals(longitude, deviceGps.longitude) &&
                Objects.equals(divisionNs, deviceGps.divisionNs) &&
                Objects.equals(latitude, deviceGps.latitude) &&
                Objects.equals(direction, deviceGps.direction) &&
                Objects.equals(speed, deviceGps.speed) &&
                Objects.equals(satellites, deviceGps.satellites) &&
                Objects.equals(precision, deviceGps.precision) &&
                Objects.equals(height, deviceGps.height) &&
                Objects.equals(retransFlag, deviceGps.retransFlag) &&
                Objects.equals(neesResponse, deviceGps.neesResponse) &&
                Objects.equals(remark, deviceGps.remark) &&
                Objects.equals(pitchAngle, deviceGps.pitchAngle) &&
                Objects.equals(relativeHeight, deviceGps.relativeHeight) &&
                Objects.equals(rollAngle, deviceGps.rollAngle) &&
                Objects.equals(verticalSpeed, deviceGps.verticalSpeed) &&
                Objects.equals(yawAngle, deviceGps.yawAngle);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, deviceId, deviceName, deviceType, batteryRemaining, time, divisionEw, longitude, divisionNs, latitude, direction, speed, satellites, precision, height, retransFlag, neesResponse, remark, pitchAngle, relativeHeight, rollAngle, verticalSpeed, yawAngle);
    }
}
